package com.springboot.jwt.error;

/**
 * @version 1.0
 * @ClassName JwtException
 * @Description
 * @Author zyj
 * @date 2021/4/1 10:44
 **/
public class AuthException extends Exception  {
    //无接口权限
    public static String code_interface_error = "1004";
    public static String code_interface_error_msg = "无接口权限";

    private String errorCode;
    private String errorMsg;

    public AuthException(){}

    public AuthException(String errorMsg){
        super(errorMsg);
        this.errorCode = "401";
        this.errorMsg = errorMsg;
    }

    public AuthException(String errorCode, String errorMsg){
        super(errorMsg);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }
}
